<?php
namespace app\common\model;

use think\Model;
use think\Db;
class Monitor extends Model
{
    // 指定表名,不含前缀
    protected $name = 'monitor';
    /**
     * @param array $arg
     * @param string $field
     */
    public function getListByArg(array $arg,$field='*')
    {
        return $this->where($arg)->field($field)->select();
    }
	
	 public function getListByArgOne(array $arg,$field='*')
    {
        return $this->where($arg)->field($field)->find();
    }
    //修改考场嫌疑人表内容
    //返回值：true
//    public function modifyMonitor($basicid,$userid,$args)
//    {
//        $this->where(['basic_id'=>$basicid,'userid'=>$userid])->update($args);
//        return true;
//    }
    //增加一个嫌疑人
    //参数：嫌疑人id 考场id
    //返回值：true
    public function insertMonitor($args)
    {
        $id = $this->insert($args,FALSE,TRUE);
        return $id;
    }
}
